3.3 \(\int x (d+i c d x) (a+b \tan ^{-1}(c x)) \, dx\)

Optimal. Leaf size=91 \[ \frac {1}{3} i c d x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {i b d \log \left (c^2 x^2+1\right )}{6 c^2}+\frac {b d \tan ^{-1}(c x)}{2 c^2}-\frac {b d x}{2 c}-\frac {1}{6} i b d x^2 \]

[Out]

-1/2*b*d*x/c-1/6*I*b*d*x^2+1/2*b*d*arctan(c*x)/c^2+1/2*d*x^2*(a+b*arctan(c*x))+1/3*I*c*d*x^3*(a+b*arctan(c*x))
+1/6*I*b*d*ln(c^2*x^2+1)/c^2

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {43, 4872, 12, 801, 635, 203, 260} \[ \frac {1}{3} i c d x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {i b d \log \left (c^2 x^2+1\right )}{6 c^2}+\frac {b d \tan ^{-1}(c x)}{2 c^2}-\frac {b d x}{2 c}-\frac {1}{6} i b d x^2 \]

Antiderivative was successfully verified.

[In]

Int[x*(d + I*c*d*x)*(a + b*ArcTan[c*x]),x]

[Out]

-(b*d*x)/(2*c) - (I/6)*b*d*x^2 + (b*d*ArcTan[c*x])/(2*c^2) + (d*x^2*(a + b*ArcTan[c*x]))/2 + (I/3)*c*d*x^3*(a
+ b*ArcTan[c*x]) + ((I/6)*b*d*Log[1 + c^2*x^2])/c^2

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rule 4872

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_))^(q_.), x_Symbol] :> With[{u = I
ntHide[(f*x)^m*(d + e*x)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 + c^2*x^
2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q}, x] && NeQ[q, -1] && IntegerQ[2*m] && ((IGtQ[m, 0] && IGtQ[q, 0
]) || (ILtQ[m + q + 1, 0] && LtQ[m*q, 0]))

Rubi steps

\begin {align*} \int x (d+i c d x) \left (a+b \tan ^{-1}(c x)\right ) \, dx &=\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{3} i c d x^3 \left (a+b \tan ^{-1}(c x)\right )-(b c) \int \frac {d x^2 (3+2 i c x)}{6+6 c^2 x^2} \, dx\\ &=\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{3} i c d x^3 \left (a+b \tan ^{-1}(c x)\right )-(b c d) \int \frac {x^2 (3+2 i c x)}{6+6 c^2 x^2} \, dx\\ &=\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{3} i c d x^3 \left (a+b \tan ^{-1}(c x)\right )-(b c d) \int \left (\frac {1}{2 c^2}+\frac {i x}{3 c}+\frac {i (3 i-2 c x)}{c^2 \left (6+6 c^2 x^2\right )}\right ) \, dx\\ &=-\frac {b d x}{2 c}-\frac {1}{6} i b d x^2+\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{3} i c d x^3 \left (a+b \tan ^{-1}(c x)\right )-\frac {(i b d) \int \frac {3 i-2 c x}{6+6 c^2 x^2} \, dx}{c}\\ &=-\frac {b d x}{2 c}-\frac {1}{6} i b d x^2+\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{3} i c d x^3 \left (a+b \tan ^{-1}(c x)\right )+(2 i b d) \int \frac {x}{6+6 c^2 x^2} \, dx+\frac {(3 b d) \int \frac {1}{6+6 c^2 x^2} \, dx}{c}\\ &=-\frac {b d x}{2 c}-\frac {1}{6} i b d x^2+\frac {b d \tan ^{-1}(c x)}{2 c^2}+\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{3} i c d x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {i b d \log \left (1+c^2 x^2\right )}{6 c^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 76, normalized size = 0.84 \[ \frac {d \left (c x (a c x (3+2 i c x)+b (-3-i c x))+i b \log \left (c^2 x^2+1\right )+b \left (2 i c^3 x^3+3 c^2 x^2+3\right ) \tan ^{-1}(c x)\right )}{6 c^2} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(d + I*c*d*x)*(a + b*ArcTan[c*x]),x]

[Out]

(d*(c*x*(b*(-3 - I*c*x) + a*c*x*(3 + (2*I)*c*x)) + b*(3 + 3*c^2*x^2 + (2*I)*c^3*x^3)*ArcTan[c*x] + I*b*Log[1 +
 c^2*x^2]))/(6*c^2)

________________________________________________________________________________________

fricas [A]  time = 1.61, size = 104, normalized size = 1.14 \[ \frac {4 i \, a c^{3} d x^{3} + 2 \, {\left (3 \, a - i \, b\right )} c^{2} d x^{2} - 6 \, b c d x + 5 i \, b d \log \left (\frac {c x + i}{c}\right ) - i \, b d \log \left (\frac {c x - i}{c}\right ) - {\left (2 \, b c^{3} d x^{3} - 3 i \, b c^{2} d x^{2}\right )} \log \left (-\frac {c x + i}{c x - i}\right )}{12 \, c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+I*c*d*x)*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

1/12*(4*I*a*c^3*d*x^3 + 2*(3*a - I*b)*c^2*d*x^2 - 6*b*c*d*x + 5*I*b*d*log((c*x + I)/c) - I*b*d*log((c*x - I)/c
) - (2*b*c^3*d*x^3 - 3*I*b*c^2*d*x^2)*log(-(c*x + I)/(c*x - I)))/c^2

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+I*c*d*x)*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

maple [A]  time = 0.03, size = 87, normalized size = 0.96 \[ \frac {i c d a \,x^{3}}{3}+\frac {d a \,x^{2}}{2}+\frac {i c d b \arctan \left (c x \right ) x^{3}}{3}+\frac {d b \arctan \left (c x \right ) x^{2}}{2}-\frac {i b d \,x^{2}}{6}-\frac {b d x}{2 c}+\frac {i b d \ln \left (c^{2} x^{2}+1\right )}{6 c^{2}}+\frac {b d \arctan \left (c x \right )}{2 c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(d+I*c*d*x)*(a+b*arctan(c*x)),x)

[Out]

1/3*I*c*d*a*x^3+1/2*d*a*x^2+1/3*I*c*d*b*arctan(c*x)*x^3+1/2*d*b*arctan(c*x)*x^2-1/6*I*b*d*x^2-1/2*b*d*x/c+1/6*
I*b*d*ln(c^2*x^2+1)/c^2+1/2*b*d*arctan(c*x)/c^2

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 88, normalized size = 0.97 \[ \frac {1}{3} i \, a c d x^{3} + \frac {1}{6} i \, {\left (2 \, x^{3} \arctan \left (c x\right ) - c {\left (\frac {x^{2}}{c^{2}} - \frac {\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b c d + \frac {1}{2} \, a d x^{2} + \frac {1}{2} \, {\left (x^{2} \arctan \left (c x\right ) - c {\left (\frac {x}{c^{2}} - \frac {\arctan \left (c x\right )}{c^{3}}\right )}\right )} b d \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+I*c*d*x)*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

1/3*I*a*c*d*x^3 + 1/6*I*(2*x^3*arctan(c*x) - c*(x^2/c^2 - log(c^2*x^2 + 1)/c^4))*b*c*d + 1/2*a*d*x^2 + 1/2*(x^
2*arctan(c*x) - c*(x/c^2 - arctan(c*x)/c^3))*b*d

________________________________________________________________________________________

mupad [B]  time = 0.38, size = 87, normalized size = 0.96 \[ \frac {d\,\left (3\,a\,x^2+3\,b\,x^2\,\mathrm {atan}\left (c\,x\right )-b\,x^2\,1{}\mathrm {i}\right )}{6}+\frac {\frac {d\,\left (3\,b\,\mathrm {atan}\left (c\,x\right )+b\,\ln \left (c^2\,x^2+1\right )\,1{}\mathrm {i}\right )}{6}-\frac {b\,c\,d\,x}{2}}{c^2}+\frac {c\,d\,\left (a\,x^3\,2{}\mathrm {i}+b\,x^3\,\mathrm {atan}\left (c\,x\right )\,2{}\mathrm {i}\right )}{6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a + b*atan(c*x))*(d + c*d*x*1i),x)

[Out]

(d*(3*a*x^2 - b*x^2*1i + 3*b*x^2*atan(c*x)))/6 + ((d*(3*b*atan(c*x) + b*log(c^2*x^2 + 1)*1i))/6 - (b*c*d*x)/2)
/c^2 + (c*d*(a*x^3*2i + b*x^3*atan(c*x)*2i))/6

________________________________________________________________________________________

sympy [A]  time = 2.89, size = 158, normalized size = 1.74 \[ \frac {i a c d x^{3}}{3} - \frac {b d x}{2 c} + \frac {b d \left (- \frac {i \log {\left (9 b c d x - 9 i b d \right )}}{12} + \frac {7 i \log {\left (9 b c d x + 9 i b d \right )}}{24}\right )}{c^{2}} + x^{2} \left (\frac {a d}{2} - \frac {i b d}{6}\right ) + \left (\frac {b c d x^{3}}{6} - \frac {i b d x^{2}}{4}\right ) \log {\left (i c x + 1 \right )} - \frac {\left (4 b c^{3} d x^{3} - 6 i b c^{2} d x^{2} - 3 i b d\right ) \log {\left (- i c x + 1 \right )}}{24 c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+I*c*d*x)*(a+b*atan(c*x)),x)

[Out]

I*a*c*d*x**3/3 - b*d*x/(2*c) + b*d*(-I*log(9*b*c*d*x - 9*I*b*d)/12 + 7*I*log(9*b*c*d*x + 9*I*b*d)/24)/c**2 + x
**2*(a*d/2 - I*b*d/6) + (b*c*d*x**3/6 - I*b*d*x**2/4)*log(I*c*x + 1) - (4*b*c**3*d*x**3 - 6*I*b*c**2*d*x**2 -
3*I*b*d)*log(-I*c*x + 1)/(24*c**2)

________________________________________________________________________________________